Filter takes a predicate p and a list xs, and returns a list containing only those elements of xs that satisfy p. For example,